<template>
  <div class="app-container menu-box">
    <div v-show="viewType==1" is="menuMgr" keep-alive></div>
    <div v-if="viewType==2" :sceneType="sceneType" is="sceneMgr" keep-alive></div>
  </div>
</template>

<script>
  import menuMgr from '@/views/system/menu/menuMgr'
  import sceneMgr from '@/views/system/menu/sceneMgr'
  export default {
    name: 'sys-menu',
    components: {
      menuMgr,
      sceneMgr
    },
    data() {
      return {
        sceneType: 0,
        viewType: 1
      }
    },
    created() {
      var that = this
    },
    methods: {
      doViewScene(item) {
        this.viewType = 2
        this.sceneType = item.Id
      },
      doCloseScene() {
        this.viewType = 1
        this.sceneType = 0
      }
    }
  }
</script>
<style rel="stylesheet/scss" lang="scss">
  .menu-box {
    height: 100%;
  }
</style>
